#include "xxx_types.h"
#include <unistd.h>

#define DEFAULT_JOURNAL_ITEM_COUNT 20
#define DEFAULT_MAPPING_ITEM_COUNT 100
#define DEFAULT_JOURNAL_OFFSET (sizeof(struct xxx_super_area))
#define DEFAULT_MAPPING_OFFSET (sizeof(struct xxx_super_area) + DEFAULT_JOURNAL_ITEM_COUNT * \
                                                                    sizeof(struct xxx_journal_item))

const struct xxx_super_area default_xxx_super_area = {
    .magic_number = XXX_MAGIC_NUM,
    .xxx_info_length = DEFAULT_MAPPING_OFFSET + DEFAULT_MAPPING_ITEM_COUNT * sizeof(struct xxx_mapping_item),
    .version = 1,
    .is_removable_dev = 0,
    .is_using_passwd = 0,
    .encrypt_algorithm = 0,

    .journal_area_offset = DEFAULT_JOURNAL_OFFSET,
    .journal_area_length = DEFAULT_JOURNAL_ITEM_COUNT * sizeof(struct xxx_journal_item),
    .journal_item_count = DEFAULT_JOURNAL_ITEM_COUNT,

    .mapping_area_offset = DEFAULT_MAPPING_OFFSET,
    .mapping_area_length = DEFAULT_MAPPING_ITEM_COUNT * sizeof(struct xxx_mapping_item),
    .mapping_item_count = DEFAULT_MAPPING_ITEM_COUNT,

    .local_dev_path = {'\0'},
    .description = {'\0'}
};

